<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/11/8 0008
 * Time: 上午 8:36
 */
require 'check_form.lib.php';
$data = array(
    'username' =>'小明',
    'password' =>'123456',
    'email' =>'xiaoming@123.com',
);
$validata = array(
    'username' =>'验证函数名',
    'password' =>'checkUsername',
    'email' =>'checkEmail',
);
$error = array();
foreach ($validata as $k=>$v){
    $result = $v($data[$k]);
    if ($result !==true){
        $error[]=$result;
    }
}
if (empty($error)){
    
}else{
    require 'register_error_html.php';
}